projects
/
ostree.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
88b4a12
)
Explicitly implement PartialEq for ObjectName to satisfy clippy
author
Felix Krull
<f_krull@gmx.de>
Fri, 12 Oct 2018 21:25:31 +0000
(23:25 +0200)
committer
Colin Walters
<walters@verbum.org>
Fri, 6 May 2022 16:53:53 +0000
(12:53 -0400)
rust-bindings/rust/libostree/src/object_name.rs
patch
|
blob
|
history
diff --git
a/rust-bindings/rust/libostree/src/object_name.rs
b/rust-bindings/rust/libostree/src/object_name.rs
index 463a06069a14ec232ad1262b508201ee19444de8..e64949236aea8b2a5a5202ff4a39692da9525c42 100644
(file)
--- a/
rust-bindings/rust/libostree/src/object_name.rs
+++ b/
rust-bindings/rust/libostree/src/object_name.rs
@@
-14,7
+14,7
@@
fn hash_object_name(v: &glib::Variant) -> u32 {
unsafe { ffi::ostree_hash_object_name(v.to_glib_none().0 as glib_ffi::gconstpointer) }
}
-#[derive(
PartialEq,
Eq, Debug)]
+#[derive(Eq, Debug)]
pub struct ObjectName {
variant: glib::Variant,
checksum: String,
@@
-66,3
+66,9
@@
impl Hash for ObjectName {
state.write_u32(hash_object_name(&self.variant));
}
}
+
+impl PartialEq for ObjectName {
+ fn eq(&self, other: &ObjectName) -> bool {
+ self.checksum == other.checksum && self.object_type == other.object_type
+ }
+}